-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convective exit #74
Merged
Merged
Convective exit #74
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #74 +/- ##
==========================================
- Coverage 93.89% 93.76% -0.14%
==========================================
Files 8 8
Lines 377 385 +8
==========================================
+ Hits 354 361 +7
- Misses 23 24 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The main problem with the previous version were the `a.u .= 0` and `a.u ./= 2` lines in `mom_step!` which kept modifying the exit plane values. I changed these lines to only update the values inside the domain. I added an `flow.exit` to the struct and initialization functions and use this to trigger the convection exit behavior. The `apply!` function had the opposite problem - it WASN'T filling in the boundary value. Now it does. It also seemed weird to me that the convection exit value in Lotus was based on the old value at the boundary but the u* value (before projection) upstream. I'm not sure it matters much, but it seems more consistent to just use the old values in both places, so that's what it does now. Finally, I added a Lamp vortex dipole test case, which is nice since it should leave the exit without changing size or speed.
We still need to get create specific exit tests (and get rid of the other file). |
b-fg
reviewed
Oct 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial commit for convective exit implementation. The 1D convection equation is applied to the
1
direction at the outlet during the first step of the predictor-corrector. A global mass flux correction ensures mass conservation on the domain. This mass flux correction imposes a Dirichlet condition (as the standardBC!(a,A)
) when the time-step is omitted (for all other calls ofBCΔt!(a,A)
basically).What we need to check:
BC!(a,A)
function (might be an issue here https://github.com/marinlauber/WaterLily/blob/2d4787c19f1675d756acb4763539223a5999ea19/src/Body.jl#L54) which sets the Homogeneous Neumann for the pressure solverThe time integration works, but there is a mismatch between the pressure field obtained with this and the one we get in Lotus.